#include<bits/stdc++.h>
using namespace std;

const int Maxn=1010;
int N,K,in[Maxn],u[Maxn],v[Maxn],hed[Maxn],cnt;
int Vis[Maxn],tot,ans;
bool Cut[Maxn][Maxn],Mark[Maxn];
struct node{
	int nxt,to;
}G[Maxn<<1];

inline int read(){
	int ret=0,f=0; char ch=getchar();
	while(!isdigit(ch)){if(ch=='-') f=1; ch=getchar();}
	while(isdigit(ch)) ret=(ret<<1)+(ret<<3)+(ch^48),ch=getchar();
	return f?-ret:ret;
}

void Addedge(int x,int y){
	G[++cnt].nxt=hed[x]; G[cnt].to=y; hed[x]=cnt;
}

void DFS(int x,int p,int col){
	Vis[x]=col;
	for(int y,i=hed[x];i;i=G[i].nxt){
		if((y=G[i].to)==p||Cut[x][y]||Cut[y][x]) continue;
		DFS(y,x,col);
	}
}

bool check(){
	memset(Mark,0,sizeof Mark);
	memset(Vis,0,sizeof Vis);
	tot=0;
	for(int i=1;i<=N;++i)if(!Vis[i]) DFS(i,0,++tot);
	for(int i=1;i<=N;++i){
		while(Vis[i+1]==Vis[i]) ++i;
		if(Mark[Vis[i]]) return 0;
		Mark[Vis[i]]=true;
	}
	return 1;
}

void CUT(int x,int res){
	if(!res){
		if(check()) ++ans;
		return;
	}
	if(x>=N) return;
	Cut[u[x]][v[x]]=true; CUT(x+1,res-1);
	Cut[u[x]][v[x]]=false; CUT(x+1,res);
}

void Solve2(){
	for(int i=1;i<=K;++i){
		if(i==1||i==N){ printf("1\n"); continue; }
		ans=0;
		CUT(1,i-1);
		printf("%d\n",ans);
	}
}

void Solve1(){
	memset(Cut,0,sizeof Cut);
	for(int i=1;i<=K;++i){
		if(i==1||i==N) { printf("1\n"); continue;}
		if(N==3){
			if(in[2]==2) printf("2\n");
			else printf("1\n");
			continue;
		}
	}
	exit(0);
}

int main(){
	freopen("soft.in","r",stdin);
	freopen("soft.out","w",stdout);
	N=read(),K=read();
	for(int i=1;i<N;++i){
		u[i]=read(),v[i]=read();
		Addedge(u[i],v[i]); Addedge(v[i],u[i]);
		++in[u[i]],++in[v[i]];
	}
	if(N<=3) Solve1();
	Solve2();
	return 0;
}
/*
4 4
1 2
4 2
3 4
*/
